Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAB-18198 Ch.Part.API: Restructure registrar init #2015

Merged
merged 1 commit into from
Oct 17, 2020
Merged

FAB-18198 Ch.Part.API: Restructure registrar init #2015

merged 1 commit into from
Oct 17, 2020

Conversation

tock-ibm
Copy link
Contributor

The Registrar now operates either with or without a system channel.
This creates two distinct (but slightly overlapping) initialization
flows. Here we restructure the Registrar initialization such that it
is clear which methods are common to both flows, and which methods
belong to the flow with or without the system channel.

For example, the current initAppChannels is split in two:

  • initAppChannelsWithSystemChannel(), which assume the system channel exists, and
  • initAppChannels(), which assumes the system channel does not exist.

This simplifies the code and makes it more readable, and tries to be
considerate of the fact that hopefully we'll be able to remove
the system channel related code (after the system channel functionality
is deprecated) so isolating it helps us later down the line.

Signed-off-by: Yoav Tock tock@il.ibm.com
Change-Id: I21b2e495745fec0859e2af998019b0a496e977e6

Type of change

  • Improvement (improvement to code, performance, etc)

Related issues

Task: FAB-18198
Epic: FAB-17712

The Registrar now operates either with or without a system channel.
This creates two distinct (but slightly overlapping) initialization
flows. Here we restructure the Registrar initialization such that it
is clear which methods are common to both flows, and which methods
belong to the flow with or without the system channel.

For example, the current `initAppChannels` is split in two:
- initAppChannelsWithSystemChannel(), which assume the system channel exists, and
- initAppChannels(), which assumes the system channel does not exist.

This simplifies the code and makes it more readable, and tries to be
considerate of the fact that hopefully we'll be able to remove
the system channel related code (after the system channel functionality
is deprecated) so isolating it helps us later down the line.

Signed-off-by: Yoav Tock <tock@il.ibm.com>
Change-Id: I21b2e495745fec0859e2af998019b0a496e977e6
@tock-ibm tock-ibm requested a review from a team as a code owner October 14, 2020 17:13
@C0rWin C0rWin merged commit 0ae1f5a into hyperledger:master Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants